package com.zsr.xmall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zsr.common.to.ware.SkuHasStockTO;
import com.zsr.common.utils.PageUtils;
import com.zsr.xmall.ware.entity.WareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author zsrey
 * @email zsrey8880@163.com
 * @date 2022-06-09 23:34:41
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 将采购完成的商品入库
     * @param skuId
     * @param wareId
     * @param skuNum
     */
    void addStock(Long skuId, Long wareId, Integer skuNum);

    /**
     * 查看是否拥有库存
     * @param skuIds
     * @return
     */
    List<SkuHasStockTO> getSkusHasStock(List<Long> skuIds);
}

